(defpackage :lem/themes
  (:use :cl :lem))
(in-package :lem/themes)

(define-color-theme "emacs-light" ()
  (:display-background-mode :light)
  (:foreground "#000000")
  (:background "#FFFFFF")
  (:inactive-window-background nil)
  (region :foreground nil :background "#eedc82")
  (modeline :background "#404040" :foreground "white")
  (modeline-inactive :background "#303030" :foreground "gray")
  (syntax-string-attribute :foreground "RosyBrown")
  (syntax-comment-attribute :foreground "firebrick")
  (syntax-keyword-attribute :foreground "purple")
  (syntax-constant-attribute :foreground "#ff00ff")
  (syntax-function-name-attribute :foreground "blue")
  (syntax-variable-attribute :foreground "darkgoldenrod")
  (syntax-type-attribute :foreground "forestgreen"))

(define-color-theme "emacs-dark" ("emacs-light")
  (:display-background-mode :dark)
  (:foreground "#FFFFFF")
  (:background "#202020")
  (:inactive-window-background nil)
  (region :foreground nil :background "blue")
  (modeline :bold t :background "#404040" :foreground "white")
  (modeline-inactive :bold t :background "#292929" :foreground "#707070")
  (syntax-string-attribute :foreground "light salmon")
  (syntax-comment-attribute :foreground "chocolate1")
  (syntax-keyword-attribute :foreground "cyan1")
  (syntax-constant-attribute :foreground "LightSteelBlue")
  (syntax-function-name-attribute :foreground "LightSkyBlue")
  (syntax-variable-attribute :foreground "LightGoldenrod")
  (syntax-type-attribute :foreground "PaleGreen"))

;; decaf base
(lem-core:define-color-theme "lem-default"
    nil
  (:display-background-mode :dark)
  (:foreground nil)
  (:background nil)
  (:inactive-window-background nil)
  (lem-core:region :foreground nil :background "#515151")
  (lem-core:syntax-warning-attribute :foreground "#ff7f7b")
  (lem/buffer/internal:syntax-string-attribute :foreground "#beda78")
  (lem/buffer/internal:syntax-comment-attribute :foreground "#777777")
  (lem/buffer/internal:syntax-keyword-attribute :foreground "#efb3f7")
  (lem/buffer/internal:syntax-constant-attribute :foreground "#ffbf70")
  (lem/buffer/internal:syntax-function-name-attribute :foreground "#90bee1")
  (lem/buffer/internal:syntax-variable-attribute :foreground "#ff7f7b")
  (lem/buffer/internal:syntax-type-attribute :foreground "#ffd67c")
  (lem-core:syntax-builtin-attribute :foreground "#bed6ff")
  (:base00 "#2d2d2d")
  (:base01 "#393939")
  (:base02 "#515151")
  (:base03 "#777777")
  (:base04 "#b4b7b4")
  (:base05 "#cccccc")
  (:base06 "#e0e0e0")
  (:base07 "#ffffff")
  (:base08 "#ff7f7b")
  (:base09 "#ffbf70")
  (:base0a "#ffd67c")
  (:base0b "#beda78")
  (:base0c "#bed6ff")
  (:base0d "#90bee1")
  (:base0e "#efb3f7")
  (:base0f "#ff93b3")

  (lem/frame-multiplexer:frame-multiplexer-active-frame-name-attribute
   :foreground "white" :background "CornflowerBlue" :bold t)
  (lem/frame-multiplexer:frame-multiplexer-frame-name-attribute
   :foreground "black" :background "dark gray" :bold t)
  (lem/frame-multiplexer:frame-multiplexer-background-attribute
   :foreground "white" :background "#262626")
  
  (document-header1-attribute :foreground "#ffffff" :bold t)
  (document-header2-attribute :foreground "#90bee1" :bold t)
  (document-header3-attribute :foreground "#bed6ff" :bold t)
  (document-header4-attribute :foreground "#efb3f7" :bold t)
  (document-header5-attribute :foreground "#ffbf70" :bold t)
  (document-header6-attribute :foreground "#beda78" :bold t)
  (document-bold-attribute :bold t)
  (document-italic-attribute :foreground "#ffbf70")
  (document-underline-attribute :underline t)
  (document-link-attribute :foreground "#90bee1" :underline t)
  (document-list-attribute :foreground "#ffbf70")
  (document-code-block-attribute :background "#393939" :foreground "#e0e0e0")
  (document-inline-code-attribute :background "#393939" :foreground "#ff93b3")
  (document-blockquote-attribute :foreground "#b4b7b4")
  (document-table-attribute :foreground "#ffffff" :background "#515151")
  (document-task-list-attribute :foreground "#beda78")
  (document-metadata-attribute :foreground "#90bee1"))
